﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlexiCommerce.Configuration;
using NUnit.Framework;

namespace FlexiCommerce.Tests.Web
{
    [TestFixture]
    public class UrlTests : PersistenceAwareBase
    {
        [Test]
        public void CleanUrl()
        {
            Assert.AreEqual("aaaaaaa", FlexiCommerce.Web.Url.Format("åäáàâã@"));
            Assert.AreEqual("aaaaaa", FlexiCommerce.Web.Url.Format("ÅÄÁÀÂÃ"));
            Assert.AreEqual("ae", FlexiCommerce.Web.Url.Format("æ"));
            Assert.AreEqual("ae", FlexiCommerce.Web.Url.Format("Æ"));
            Assert.AreEqual("oooo", FlexiCommerce.Web.Url.Format("öøôõ"));
            Assert.AreEqual("oooo", FlexiCommerce.Web.Url.Format("ÖØÔÕ"));
            Assert.AreEqual("this-is-a-string-with-spaces", FlexiCommerce.Web.Url.Format("this is a string with spaces"));
            Assert.AreEqual("aabbcc", FlexiCommerce.Web.Url.Format("AaBbCc"));
        }
    }
}
